package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanEnterprise;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.EnterpriseHomeModel;
import com.thrd.taiexhibition.view.EnterpriseHomeView;

/**
 * @author: ${唐杰}
 * @date: 2021/3/31
 */
public class EnterpriseHomePresener {
    private EnterpriseHomeModel mEnterpriseHomeModel;
    private EnterpriseHomeView mEnterpriseHomeView;

    public EnterpriseHomePresener(EnterpriseHomeView mEnterpriseHomeView){
        this.mEnterpriseHomeView=mEnterpriseHomeView;
        this.mEnterpriseHomeModel=new EnterpriseHomeModel();
    }


    public void getCityStorData(int id){
        mEnterpriseHomeModel.getEnterpriseHome(id + "", new MvpCallback<BeanEnterprise>() {
            @Override
            public void onSuccess(BeanEnterprise mBeanEnterprise) {
                mEnterpriseHomeView.onSuccess(mBeanEnterprise);
            }

            @Override
            public void onFailed(String e, int code) {
                mEnterpriseHomeView.onError(e,code);
            }
        });
    }

}
